package com.styytech.dadabao.ui.my;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.lidroid.xutils.view.annotation.ContentView;
import com.lidroid.xutils.view.annotation.ViewInject;
import com.lidroid.xutils.view.annotation.event.OnClick;
import com.styytech.dadabao.DadaApplication;
import com.styytech.dadabao.R;
import com.styytech.dadabao.base.BaseActivity;
import com.styytech.dadabao.module.share.SharedDialogActivity;


@ContentView(R.layout.activity_invite_friends)
public class InviteFriendsActivity extends BaseActivity {

    @ViewInject(R.id.btn_invite)
    Button btn_invite;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initData();
        initView();
    }

    private void initData() {
        context = this;
    }

    /**
     * 初始化界面
     */
    private void initView() {
        DadaApplication.addActivity(this);
        setTopView();
    }

    private void setTopView() {
        setTopBar(resources.getString(R.string.detials_more_invite_friends), View.VISIBLE);
        setTopBar(null, View.VISIBLE, View.VISIBLE, resources.getString(R.string.common_back));
    }

    @OnClick(R.id.btn_invite)
    private void onClickView(View view) {
        switch (view.getId()) {
            case R.id.btn_invite:
                Intent intent = new Intent(this, SharedDialogActivity.class);

                intent.putExtra("title", "大大宝");
                intent.putExtra("content", "小额起投，马上注册有惊喜！大大宝带你轻松理财！" + " https://www.dadabao.net/client/jsp/portal/register.jsp");
                intent.putExtra("newsPic", "http://a3.qpic.cn/psb?/V13WHAXa1pm8zp/rfMYjf08AXruAXPbJQsBhiZ2WkPkKhS4IP0f2QIeJJQ!/b/dHYBAAAAAAAA&bo=kACQAAAAAAADByI!&rf=viewer_4");
                intent.putExtra("shareUrl", "https://www.dadabao.net/client/jsp/portal/register.jsp");


                startActivity(intent);
                break;
        }
    }

}
